{extend name="user-layout" /}
{block name="content"}
<div class="content-wrapper">
    <div class="row">
        {include file="balance/info"}
        <div class="col-md-8 grid-margin stretch-card">
            <div class="card">
                <div class="card-body">
                    <h4 class="card-title">资金明细</h4>
                    <div class="table-responsive">
                        <table class="table table-sm table-bordered table-hover table-sm">
                            <thead>
                                <tr>
                                    <th class="text-center">类型</th>
                                    <th>前额</th>
                                    <th>变动</th>
                                    <th>后额</th>
                                    <th>备注</th>
                                    <th class="text-center">时间</th>
                                </tr>
                            </thead>
                            <tbody>
                                {volist name="list" id="vo"}
                                <tr>
                                    <td>
                                        {switch $vo.type}
                                        {case enable}可用余额{/case}
                                        {case disable}待结算余额{/case}
                                        {default}可用余额
                                        {/switch}
                                    </td>
                                    <td class="text-warning text-right">
                                        {:number_format($vo.preinc,2)}
                                    </td>
                                    <td class="text-danger text-right">
                                        {if condition="$vo.increase > 0"}
                                        + {:number_format($vo.increase,2)}
                                        {elseif condition="$vo.reduce > 0"/}
                                        - {:number_format($vo.reduce,2)}
                                        {else /}
                                        0.00
                                        {/if}
                                    </td>
                                    <td class="text-info text-right">
                                        {:number_format($vo.suffixred,2)}
                                    </td>
                                    <td>
                                        {$vo.remarks}
                                    </td>
                                    <td class="text-center">
                                        {$vo.create_time|date='Y/m/d h:i:s',###}
                                    </td>
                                </tr>
                                {/volist}
                            </tbody>
                        </table>
                    </div>
                    {$list->render()}
                    {empty name="list"}
                    <div class="card" id="context-menu-multi">
                        <div class="card-body">
                            <p class="card-text text-center text-danger">
                                <i class="icon-compass"></i>
                                暂无数据...
                            </p>
                        </div>
                    </div>
                    {/empty}
                </div>
            </div>
        </div>
    </div>
</div>
{/block}